/*
 * ServiceMessageListItem.java
 * business
 *
 * Created by ChenTao on 2017/1/9.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.displaylistitem;

import android.content.Context;
import android.view.View;

import com.yidiandao.business.R;
import com.yidiandao.business.data.bean.Message;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.viewholder.ServiceMessageHolder;
import com.yidiandao.business.utils.UmengUtils;
import com.yidiandao.business.utils.V5ChartUtils;

/** 客服消息ListItem */
public class ServiceMessageListItem extends DisplayListItem<ServiceMessageHolder, Message> {

    public ServiceMessageListItem(Message message) {
        super(message);
    }

    @Override
    public void onShow(final Context context, ServiceMessageHolder holder) {
        holder.mRootLayout.setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        //在线客服
                        UmengUtils.onEvent(context, R.string.umeng_online_server);
                        V5ChartUtils.toV5ChartActivity();
                    }
                });
    }

    @Override
    public String getDisplayItemTag() {
        return ServiceMessageListItem.class.getSimpleName();
    }

    @Override
    public Class<ServiceMessageHolder> getViewHolderClazz() {
        return ServiceMessageHolder.class;
    }
}
